package net.comm.group.web.form;

import net.comm.page.PageCtr;

import org.apache.struts.action.*;


public class GAlbumForm extends ActionForm {

	private static final long serialVersionUID = 1L;
	private static final String KEY_SPLIT = "#,##,#,#,#";

	private int  	QryGroupID;	//
	private int  	QryUserID;		//
	private String  QryOrderby;		//

	private int  	GalbumID;	//
	private int  	GroupID;	//
	private String  Albumname;	//相册名称
	private String  Albuminfo;	//相册说明
	private String 	Afolder;	//相册文件夹
	private int  	Num;		//相片张数
	private int  	UserID;		//
	private String  Protect;	//隐私设置
	private String  Delflg;		//删除标志
	private String  Ctime;		//
	private String  Mtime;		//
	
	private String action = "";
	
	public GAlbumForm() {
		super();
		// TODO Auto-generated constructor stub
		Clear();
	}
	public void Clear() {
		
		QryGroupID = 0;
		QryUserID = 0;
		QryOrderby = "";
		
		GalbumID = 0;	//
		GroupID = 0;	//
		Albumname = "";	//相册名称
		Albuminfo = "";	//相册说明
		Afolder = "";	//相册文件夹
		Num = 0;		//相片张数
		UserID = 0;		//
		Protect = "";	//隐私设置
		Delflg = "";	//删除标志
		Ctime = "";		//
		Mtime = "";		//			
	}

	/**
	 * 查询当前页主键值串
	 */
	private String key = "";

	/**
	 * 查询上上页主键值串
	 */
	private String lastKey = "";
	

	/**
	 * 分页控制对象
	 */
	private PageCtr page;
	



	public PageCtr getPage() {
		return page;
	}

	public void setPage(PageCtr page) {
		this.page = page;
	}
	
	/**
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String[] array) {
		if(key != null && key.trim().length() > 0) {
			key = "";
		}
		
		StringBuffer keyBuff = new StringBuffer();
		for (int i = 0; i < array.length; i++) 
		{
			/**
			 * 防止空字符串引起的split方法异常
			 */
			if(array[i] == null || array[i].length() == 0) {
				keyBuff.append(" ");
			} else {
				keyBuff.append(array[i]);
			}
			
			keyBuff.append(KEY_SPLIT);
		}
		
		key = keyBuff.toString();		
	}
	
	/**
	 * 获取lastKey值
	 * @return
	 */
	public String[] lastKey()
	{
		if(lastKey == null || lastKey.trim().length() == 0) {
			return null;
		}
		
		return lastKey.split(KEY_SPLIT);
	}
	
	public String getLastKey() {
		return lastKey;
	}

	public void setLastKey(String lastKey) {
		this.lastKey = lastKey;
	}	

	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}

	public static String getKEY_SPLIT() {
		return KEY_SPLIT;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}


	public String getAlbumname() {
		return Albumname;
	}

	public String getAlbuminfo() {
		return Albuminfo;
	}
	public String getDelflg() {
		return Delflg;
	}
	public void setAlbumname(String albumname) {
		Albumname = albumname;
	}

	public void setAlbuminfo(String albuminfo) {
		Albuminfo = albuminfo;
	}

	public int getGroupID() {
		return GroupID;
	}


	public int getNum() {
		return Num;
	}

	public int getUserID() {
		return UserID;
	}

	public String getCtime() {
		return Ctime;
	}

	public String getMtime() {
		return Mtime;
	}


	public int getGalbumID() {
		return GalbumID;
	}

	public String getAfolder() {
		return Afolder;
	}

	public String getProtect() {
		return Protect;
	}

	public void setGalbumID(int galbumID) {
		GalbumID = galbumID;
	}

	public void setAfolder(String afolder) {
		Afolder = afolder;
	}

	public void setProtect(String protect) {
		Protect = protect;
	}

	public void setGroupID(int groupID) {
		GroupID = groupID;
	}

	public void setUserID(int userID) {
		UserID = userID;
	}

	public void setDelflg(String delflg) {
		Delflg = delflg;
	}

	public void setCtime(String ctime) {
		Ctime = ctime;
	}

	public void setMtime(String mtime) {
		Mtime = mtime;
	}

	public void setNum(int num) {
		Num = num;
	}
	public int getQryGroupID() {
		return QryGroupID;
	}
	public void setQryGroupID(int qryGroupID) {
		QryGroupID = qryGroupID;
	}
	public int getQryUserID() {
		return QryUserID;
	}
	public void setQryUserID(int qryUserID) {
		QryUserID = qryUserID;
	}
	public String getQryOrderby() {
		return QryOrderby;
	}
	public void setQryOrderby(String qryOrderby) {
		QryOrderby = qryOrderby;
	}


	
}